<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=0">
    <title></title>
    <style>
        body,html{
            padding:0;
            margin:0;
        }
        div{
            width:100%;
            height:200px;
            border:20px solid red;
            /*此时宽度包括边框，这样就不会出现滚动条了,不会溢出了*/
            box-sizing: border-box;
        }
    </style>
</head>
<body>
    <div></div>
</body>
</html>